• CToken tests

    CToken tests

    Accounts

    Seed Address Public_key Public_key_hash Secret_key
    'Alice'tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1GwiedpkuvNy6TuQ2z8o9wnoaTtTXkzQk7nhegCHfxBc4ecsd4qG71KYNGtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1GwiedskRijgcXx8gzqkq7SCBbrb6aDZQMmP6dznCQWgU1Jr4qPfJT1yFq5A39ja9G4wahS8uWtBurZy14Hy7GZkQh7WnopJTKtCQG
    'Bob'tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9CedpkufVmvzkm4oFQ7WcF5NJbq9BFB2mWRsm4Dyh2spMDuDxWSQWHuTtz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9CedskRq1xuW7TCYzdFm1JQLi1Hz4MNDVP6ukQHVEEh3bVqyuzv7pXXjaGsXZuMbwtd3kQFp3LQ7GQzkLeprNEijKhQKzsxrYrUz
    'admin'tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5edpkthtmpNV7DzPgvsU5ktVkfYbARpb2nzDbncU8mdbMeXGRhGTjN7tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5edskRjPeZkNsmeJ8aAzs5vyXVhP7DVRvG6nM1ReNfjzkR3h6ykbf71mPxQyE5HU9FHrV3EdrY4GVCSBWhU44v6bnhQGrKM9Cs8

    Contracts

    Contract

    New contract: KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1

    Balance: 0.000000tz

    Storage:

    Last

    Code:

    import smartpy as sp

    class Contract(sp.Contract):
    def __init__(self):
      self.init_type(sp.TRecord(last = sp.TOption(sp.TNat)).layout("last"))
      self.init(last = sp.none)


    @sp.entry_point
    def target(self, params):
      self.data.last = sp.some(params)

    @sp.entry_point
    def targetNat(self, params):
      sp.set_type(params, sp.TNat)
      self.data.last = sp.some(params)
    Contract

    New contract: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    Balance: 0.000000tz

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue

    Code:

    import smartpy as sp

    class Contract(sp.Contract):
    def __init__(self):
      self.init_type(sp.TRecord(borrow_allowed = sp.TBool, mint_allowed = sp.TBool, redeem_allowed = sp.TBool, repay_borrow_allowed = sp.TBool).layout((("borrow_allowed", "mint_allowed"), ("redeem_allowed", "repay_borrow_allowed"))))
      self.init(borrow_allowed = True,
                mint_allowed = True,
                redeem_allowed = True,
                repay_borrow_allowed = True)


    @sp.entry_point
    def acceptGovernance(self, params):
      sp.set_type(params, sp.TAddress)

    @sp.entry_point
    def borrowAllowed(self, params):
      sp.set_type(params, sp.TRecord(borrowAmount = sp.TNat, borrower = sp.TAddress, cToken = sp.TAddress).layout(("cToken", ("borrower", "borrowAmount"))))
      sp.verify(self.data.borrow_allowed)

    @sp.entry_point
    def disableMarket(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def enterMarkets(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def exitMarket(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def getHypoAccountLiquidity(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def mintAllowed(self, params):
      sp.set_type(params, sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))))
      sp.verify(self.data.mint_allowed)

    @sp.entry_point
    def redeemAllowed(self, params):
      sp.set_type(params, sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))))
      sp.verify(self.data.redeem_allowed)

    @sp.entry_point
    def repayBorrowAllowed(self, params):
      sp.set_type(params, sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))))
      sp.verify(self.data.repay_borrow_allowed)

    @sp.entry_point
    def setBorrowAllowed(self, params):
      self.data.borrow_allowed = params

    @sp.entry_point
    def setBorrowPaused(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setCloseFactor(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setCollateralFactor(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setLiquidationIncentive(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setLiquidityPeriodRelevance(self, params):
      sp.set_type(params, sp.TNat)

    @sp.entry_point
    def setMarketBorrowCap(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setMintAllowed(self, params):
      self.data.mint_allowed = params

    @sp.entry_point
    def setMintPaused(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setPendingGovernance(self, params):
      sp.set_type(params, sp.TAddress)

    @sp.entry_point
    def setPriceOracle(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def setPricePeriodRelevance(self, params):
      sp.set_type(params, sp.TNat)

    @sp.entry_point
    def setRedeemAllowed(self, params):
      self.data.redeem_allowed = params

    @sp.entry_point
    def setRepayBorrowAllowed(self, params):
      self.data.repay_borrow_allowed = params

    @sp.entry_point
    def setTransferPaused(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def supportMarket(self, params):
      sp.set_type(params, sp.TUnit)

    @sp.entry_point
    def transferAllowed(self, params):
      sp.set_type(params, sp.TRecord(cToken = sp.TAddress, dst = sp.TAddress, src = sp.TAddress, transferTokens = sp.TNat).layout((("cToken", "src"), ("dst", "transferTokens"))))

    @sp.entry_point
    def updateAccountLiquidity(self, params):
      sp.set_type(params, sp.TAddress)

    @sp.entry_point
    def updateAssetPrice(self, params):
      sp.set_type(params, sp.TAddress)
    Contract

    New contract: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Storage:

    BorrowRate SupplyRate

    Code:

    import smartpy as sp

    class Contract(sp.Contract):
    def __init__(self):
      self.init_type(sp.TRecord(borrowRate = sp.TNat, supplyRate = sp.TNat).layout(("borrowRate", "supplyRate")))
      self.init(borrowRate = 840000000000,
                supplyRate = 180000000000)


    @sp.entry_point
    def getBorrowRate(self, params):
      sp.set_type(params, sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))))
      sp.transfer(self.data.borrowRate, sp.tez(0), params.cb)

    @sp.entry_point
    def getSupplyRate(self, params):
      sp.set_type(params, sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))))
      sp.transfer(self.data.supplyRate, sp.tez(0), params.cb)

    @sp.entry_point
    def setBorrowRate(self, params):
      sp.set_type(params, sp.TNat)
      self.data.borrowRate = params

    @sp.entry_point
    def setSupplyRate(self, params):
      sp.set_type(params, sp.TNat)
      self.data.supplyRate = params
    Contract

    New contract: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse

    Code:

    import smartpy as sp

    class Contract(sp.Contract):
    def __init__(self):
      self.init_type(sp.TRecord(accBorrowBalance = sp.TNat, accCTokenBalance = sp.TNat, accExchangeRateMantissa = sp.TNat, accrualBlockNumber = sp.TNat, accrualIntPeriodRelevance = sp.TNat, activeOperations = sp.TSet(sp.TNat), administrator = sp.TAddress, balances = sp.TBigMap(sp.TAddress, sp.TRecord(accountBorrows = sp.TRecord(interestIndex = sp.TNat, principal = sp.TNat).layout(("interestIndex", "principal")), approvals = sp.TMap(sp.TAddress, sp.TNat), balance = sp.TNat).layout(("accountBorrows", ("approvals", "balance")))), borrowIndex = sp.TNat, borrowRateMaxMantissa = sp.TNat, borrowRatePerBlock = sp.TNat, comptroller = sp.TAddress, expScale = sp.TNat, halfExpScale = sp.TNat, initialExchangeRateMantissa = sp.TNat, interestRateModel = sp.TAddress, isAccrualInterestValid = sp.TBool, pendingAdministrator = sp.TOption(sp.TAddress), reserveFactorMantissa = sp.TNat, reserveFactorMaxMantissa = sp.TNat, supplyRatePerBlock = sp.TNat, totalBorrows = sp.TNat, totalReserves = sp.TNat, totalSupply = sp.TNat).layout((((("accBorrowBalance", ("accCTokenBalance", "accExchangeRateMantissa")), ("accrualBlockNumber", ("accrualIntPeriodRelevance", "activeOperations"))), (("administrator", ("balances", "borrowIndex")), ("borrowRateMaxMantissa", ("borrowRatePerBlock", "comptroller")))), ((("expScale", ("halfExpScale", "initialExchangeRateMantissa")), ("interestRateModel", ("isAccrualInterestValid", "pendingAdministrator"))), (("reserveFactorMantissa", ("reserveFactorMaxMantissa", "supplyRatePerBlock")), ("totalBorrows", ("totalReserves", "totalSupply")))))))
      self.init(accBorrowBalance = 0,
                accCTokenBalance = 0,
                accExchangeRateMantissa = 0,
                accrualBlockNumber = 0,
                accrualIntPeriodRelevance = 5,
                activeOperations = sp.set([]),
                administrator = sp.address('tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5'),
                balances = {},
                borrowIndex = 1000000000000000000,
                borrowRateMaxMantissa = 5000000000000,
                borrowRatePerBlock = 0,
                comptroller = sp.address('KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF'),
                expScale = 1000000000000000000,
                halfExpScale = 500000000000000000,
                initialExchangeRateMantissa = 1000000000000,
                interestRateModel = sp.address('KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H'),
                isAccrualInterestValid = False,
                pendingAdministrator = sp.none,
                reserveFactorMantissa = 0,
                reserveFactorMaxMantissa = 1000000000000000000,
                supplyRatePerBlock = 0,
                totalBorrows = 0,
                totalReserves = 0,
                totalSupply = 0)


    @sp.entry_point
    def acceptGovernance(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.sender == self.data.pendingAdministrator.open_some(message = 'CT_NOT_SET_PENDING_ADMIN'), 'CT_NOT_PENDING_ADMIN')
      self.data.administrator = self.data.pendingAdministrator.open_some()
      self.data.pendingAdministrator = sp.none

    @sp.entry_point
    def accrueInterest(self, params):
      sp.set_type(params, sp.TUnit)
      sp.if self.data.accrualBlockNumber == 0:
        self.data.accrualBlockNumber = sp.level
      sp.if sp.level != self.data.accrualBlockNumber:
        self.data.activeOperations.add(8)
        sp.transfer(sp.record(borrows = self.data.totalBorrows, cash = self.data.totalSupply // 1000000, cb = sp.self_entry_point('doAccrueInterest'), reserves = self.data.totalReserves), sp.tez(0), sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), self.data.interestRateModel, entry_point='getBorrowRate').open_some())
      self.data.isAccrualInterestValid = True

    @sp.entry_point
    def addReserves(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(11)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('accrueInterest'))
      sp.transfer(sp.record(addAmount = params, originalSender = sp.sender), sp.amount, sp.self_entry_point('addReservesInternal'))

    @sp.entry_point
    def addReservesInternal(self, params):
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(11), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(11)
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      self.data.totalReserves += params.addAmount
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def approve(self, params):
      sp.set_type(params, sp.TRecord(spender = sp.TAddress, value = sp.TNat).layout(("spender", "value")))
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.verify((self.data.balances[sp.sender].approvals.get(params.spender, default_value = 0) == 0) | (params.value == 0), 'CT_UNSAFE_ALLOWANCE_CHANGE')
      self.data.balances[sp.sender].approvals[params.spender] = params.value

    @sp.entry_point
    def borrow(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.if ~ (self.data.balances.contains(sp.sender)):
        self.data.balances[sp.sender] = sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 0)
      sp.transfer(sp.record(cToken = sp.self_address, borrower = sp.sender, borrowAmount = params), sp.tez(0), sp.contract(sp.TRecord(borrowAmount = sp.TNat, borrower = sp.TAddress, cToken = sp.TAddress).layout(("cToken", ("borrower", "borrowAmount"))), self.data.comptroller, entry_point='borrowAllowed').open_some())
      sp.verify((self.data.totalSupply // 1000000) >= params, 'CT_INSUFFICIENT_CASH')
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      borrowSnapshot = sp.local("borrowSnapshot", self.data.balances[sp.sender].accountBorrows)
      borrowBalance = sp.local("borrowBalance", 0)
      sp.if borrowSnapshot.value.principal > 0:
        borrowBalance.value = (borrowSnapshot.value.principal * self.data.borrowIndex) // borrowSnapshot.value.interestIndex
      self.data.balances[sp.sender].accountBorrows.principal = borrowBalance.value + params
      self.data.balances[sp.sender].accountBorrows.interestIndex = self.data.borrowIndex
      self.data.totalBorrows += borrowBalance.value + params
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def borrowBalanceStored(self, params):
      sp.set_type(sp.fst(params), sp.TAddress)
      borrowSnapshot = sp.local("borrowSnapshot", self.data.balances[sp.fst(params)].accountBorrows)
      borrowBalance = sp.local("borrowBalance", 0)
      sp.if borrowSnapshot.value.principal > 0:
        borrowBalance.value = (borrowSnapshot.value.principal * self.data.borrowIndex) // borrowSnapshot.value.interestIndex
      __s1 = sp.local("__s1", borrowBalance.value)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s1.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def doAccrueInterest(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender == self.data.interestRateModel, 'CT_SENDER_NOT_IRM')
      sp.verify(self.data.activeOperations.contains(8), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(8)
      sp.verify(params <= self.data.borrowRateMaxMantissa, 'CT_INVALID_BORROW_RATE')
      sp.set_type(params, sp.TNat)
      sp.set_type(sp.record(mantissa = params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(sp.as_nat(sp.level - self.data.accrualBlockNumber), sp.TNat)
      sp.set_type(params * sp.as_nat(sp.level - self.data.accrualBlockNumber), sp.TNat)
      compute_CToken_545 = sp.local("compute_CToken_545", sp.record(mantissa = params * sp.as_nat(sp.level - self.data.accrualBlockNumber)))
      sp.set_type(compute_CToken_545.value, sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(compute_CToken_545.value, sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(self.data.totalBorrows, sp.TNat)
      sp.set_type(compute_CToken_545.value.mantissa * self.data.totalBorrows, sp.TNat)
      sp.set_type(sp.record(mantissa = compute_CToken_545.value.mantissa * self.data.totalBorrows), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      compute_CToken_546 = sp.local("compute_CToken_546", (compute_CToken_545.value.mantissa * self.data.totalBorrows) // self.data.expScale)
      self.data.totalBorrows = compute_CToken_546.value + self.data.totalBorrows
      sp.set_type(sp.record(mantissa = self.data.reserveFactorMantissa), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(compute_CToken_546.value, sp.TNat)
      sp.set_type(self.data.totalReserves, sp.TNat)
      sp.set_type(sp.record(mantissa = self.data.reserveFactorMantissa), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(sp.record(mantissa = self.data.reserveFactorMantissa), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(compute_CToken_546.value, sp.TNat)
      sp.set_type(self.data.reserveFactorMantissa * compute_CToken_546.value, sp.TNat)
      sp.set_type(sp.record(mantissa = self.data.reserveFactorMantissa * compute_CToken_546.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      self.data.totalReserves = ((self.data.reserveFactorMantissa * compute_CToken_546.value) // self.data.expScale) + self.data.totalReserves
      sp.set_type(compute_CToken_545.value, sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(self.data.borrowIndex, sp.TNat)
      sp.set_type(self.data.borrowIndex, sp.TNat)
      sp.set_type(compute_CToken_545.value, sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(compute_CToken_545.value, sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(self.data.borrowIndex, sp.TNat)
      sp.set_type(compute_CToken_545.value.mantissa * self.data.borrowIndex, sp.TNat)
      sp.set_type(sp.record(mantissa = compute_CToken_545.value.mantissa * self.data.borrowIndex), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      self.data.borrowIndex = ((compute_CToken_545.value.mantissa * self.data.borrowIndex) // self.data.expScale) + self.data.borrowIndex
      self.data.accrualBlockNumber = sp.level

    @sp.entry_point
    def exchangeRateStored(self, params):
      sp.set_type(sp.fst(params), sp.TUnit)
      excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
      sp.if self.data.totalSupply > 0:
        sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
        sp.set_type(0, sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
        sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(self.data.totalSupply, sp.TNat)
        sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
        sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
        excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
      __s2 = sp.local("__s2", excRate.value)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s2.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getAccountSnapshot(self, params):
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      borrowSnapshot = sp.local("borrowSnapshot", self.data.balances[sp.fst(params)].accountBorrows)
      borrowBalance = sp.local("borrowBalance", 0)
      sp.if borrowSnapshot.value.principal > 0:
        borrowBalance.value = (borrowSnapshot.value.principal * self.data.borrowIndex) // borrowSnapshot.value.interestIndex
      excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
      sp.if self.data.totalSupply > 0:
        sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
        sp.set_type(0, sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
        sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(self.data.totalSupply, sp.TNat)
        sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
        sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
        excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
      __s3 = sp.local("__s3", sp.record(account = sp.fst(params), borrowBalance = borrowBalance.value, cTokenBalance = self.data.balances[sp.fst(params)].balance, exchangeRateMantissa = excRate.value))
      sp.set_type(sp.snd(params), sp.TContract(sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa")))))
      sp.transfer(__s3.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getAllowance(self, params):
      __s4 = sp.local("__s4", self.data.balances[sp.fst(params).owner].approvals[sp.fst(params).spender])
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s4.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getBalance(self, params):
      __s5 = sp.local("__s5", self.data.balances[sp.fst(params)].balance)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s5.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getBalanceOfUnderlying(self, params):
      sp.set_type(sp.fst(params), sp.TAddress)
      excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
      sp.if self.data.totalSupply > 0:
        sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
        sp.set_type(0, sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
        sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(self.data.totalSupply, sp.TNat)
        sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
        sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
        excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
      sp.set_type(excRate.value, sp.TNat)
      sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      sp.set_type(self.data.balances[sp.fst(params)].balance, sp.TNat)
      sp.set_type(excRate.value * self.data.balances[sp.fst(params)].balance, sp.TNat)
      sp.set_type(sp.record(mantissa = excRate.value * self.data.balances[sp.fst(params)].balance), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
      __s6 = sp.local("__s6", (excRate.value * self.data.balances[sp.fst(params)].balance) // self.data.expScale)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s6.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getCash(self, params):
      sp.set_type(sp.fst(params), sp.TUnit)
      __s7 = sp.local("__s7", self.data.totalSupply // 1000000)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s7.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def getTotalSupply(self, params):
      sp.set_type(sp.fst(params), sp.TUnit)
      __s8 = sp.local("__s8", self.data.totalSupply)
      sp.set_type(sp.snd(params), sp.TContract(sp.TNat))
      sp.transfer(__s8.value, sp.tez(0), sp.snd(params))

    @sp.entry_point
    def hardResetOp(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      self.data.activeOperations = sp.set([])

    @sp.entry_point
    def mint(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.if ~ (self.data.balances.contains(sp.sender)):
        self.data.balances[sp.sender] = sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 0)
      sp.transfer(sp.record(cToken = sp.self_address, minter = sp.sender, mintAmount = params), sp.tez(0), sp.contract(sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))), self.data.comptroller, entry_point='mintAllowed').open_some())
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
      sp.if self.data.totalSupply > 0:
        sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
        sp.set_type(0, sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
        sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
        sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(self.data.totalSupply, sp.TNat)
        sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
        sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
        excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
      amount = sp.local("amount", 0)
      sp.if True:
        sp.set_type(excRate.value, sp.TNat)
        sp.set_type(params, sp.TNat)
        sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.verify(excRate.value > 0, 'DIVISION_BY_ZERO')
        compute_CToken_747 = sp.local("compute_CToken_747", (params * self.data.expScale) // excRate.value)
        amount.value = compute_CToken_747.value
      sp.else:
        sp.set_type(excRate.value, sp.TNat)
        sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        sp.set_type(params, sp.TNat)
        sp.set_type(excRate.value * params, sp.TNat)
        sp.set_type(sp.record(mantissa = excRate.value * params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
        compute_CToken_749 = sp.local("compute_CToken_749", (excRate.value * params) // self.data.expScale)
        amount.value = compute_CToken_749.value
      self.data.totalSupply += amount.value
      self.data.balances[sp.sender].balance += amount.value
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def redeem(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.transfer(sp.record(cToken = sp.self_address, redeemer = sp.sender, redeemAmount = params), sp.tez(0), sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), self.data.comptroller, entry_point='redeemAllowed').open_some())
      redeem_amount = sp.local("redeem_amount", 0)
      sp.if False:
        redeem_amount.value = params
      sp.else:
        excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
        sp.if self.data.totalSupply > 0:
          sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
          sp.set_type(0, sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
          sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(self.data.totalSupply, sp.TNat)
          sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
          sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
          excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
        amount = sp.local("amount", 0)
        sp.if False:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.verify(excRate.value > 0, 'DIVISION_BY_ZERO')
          compute_CToken_747 = sp.local("compute_CToken_747", (params * self.data.expScale) // excRate.value)
          amount.value = compute_CToken_747.value
        sp.else:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(params, sp.TNat)
          sp.set_type(excRate.value * params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value * params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          compute_CToken_749 = sp.local("compute_CToken_749", (excRate.value * params) // self.data.expScale)
          amount.value = compute_CToken_749.value
        redeem_amount.value = amount.value
      redeem_tokens = sp.local("redeem_tokens", 0)
      sp.if False:
        excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
        sp.if self.data.totalSupply > 0:
          sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
          sp.set_type(0, sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
          sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(self.data.totalSupply, sp.TNat)
          sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
          sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
          excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
        amount = sp.local("amount", 0)
        sp.if True:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.verify(excRate.value > 0, 'DIVISION_BY_ZERO')
          compute_CToken_747 = sp.local("compute_CToken_747", (params * self.data.expScale) // excRate.value)
          amount.value = compute_CToken_747.value
        sp.else:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(params, sp.TNat)
          sp.set_type(excRate.value * params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value * params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          compute_CToken_749 = sp.local("compute_CToken_749", (excRate.value * params) // self.data.expScale)
          amount.value = compute_CToken_749.value
        redeem_tokens.value = amount.value
      sp.else:
        redeem_tokens.value = params
      sp.verify((self.data.totalSupply // 1000000) >= redeem_amount.value, 'CT_INSUFFICIENT_CASH')
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      self.data.totalSupply = sp.as_nat(self.data.totalSupply - redeem_tokens.value, message = 'Insufficient supply')
      self.data.balances[sp.sender].balance = sp.as_nat(self.data.balances[sp.sender].balance - redeem_tokens.value, message = 'Insufficient balance')
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def redeemUnderlying(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.transfer(sp.record(cToken = sp.self_address, redeemer = sp.sender, redeemAmount = params), sp.tez(0), sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), self.data.comptroller, entry_point='redeemAllowed').open_some())
      redeem_amount = sp.local("redeem_amount", 0)
      sp.if True:
        redeem_amount.value = params
      sp.else:
        excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
        sp.if self.data.totalSupply > 0:
          sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
          sp.set_type(0, sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
          sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(self.data.totalSupply, sp.TNat)
          sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
          sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
          excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
        amount = sp.local("amount", 0)
        sp.if False:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.verify(excRate.value > 0, 'DIVISION_BY_ZERO')
          compute_CToken_747 = sp.local("compute_CToken_747", (params * self.data.expScale) // excRate.value)
          amount.value = compute_CToken_747.value
        sp.else:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(params, sp.TNat)
          sp.set_type(excRate.value * params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value * params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          compute_CToken_749 = sp.local("compute_CToken_749", (excRate.value * params) // self.data.expScale)
          amount.value = compute_CToken_749.value
        redeem_amount.value = amount.value
      redeem_tokens = sp.local("redeem_tokens", 0)
      sp.if True:
        excRate = sp.local("excRate", self.data.initialExchangeRateMantissa)
        sp.if self.data.totalSupply > 0:
          sp.set_type(self.data.totalSupply // 1000000, sp.TNat)
          sp.set_type(0, sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves), sp.TNat)
          sp.set_type(sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale, sp.TNat)
          sp.set_type(sp.record(mantissa = sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(self.data.totalSupply, sp.TNat)
          sp.verify(self.data.totalSupply > 0, 'DIVISION_BY_ZERO')
          sp.set_type((sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply, sp.TNat)
          excRate.value = (sp.as_nat((sp.as_nat((self.data.totalSupply // 1000000) - 0, message = 'SUBTRACTION_UNDERFLOW') + self.data.totalBorrows) - self.data.totalReserves) * self.data.expScale) // self.data.totalSupply
        amount = sp.local("amount", 0)
        sp.if True:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.verify(excRate.value > 0, 'DIVISION_BY_ZERO')
          compute_CToken_747 = sp.local("compute_CToken_747", (params * self.data.expScale) // excRate.value)
          amount.value = compute_CToken_747.value
        sp.else:
          sp.set_type(excRate.value, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(sp.record(mantissa = excRate.value), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          sp.set_type(params, sp.TNat)
          sp.set_type(excRate.value * params, sp.TNat)
          sp.set_type(sp.record(mantissa = excRate.value * params), sp.TRecord(mantissa = sp.TNat).layout("mantissa"))
          compute_CToken_749 = sp.local("compute_CToken_749", (excRate.value * params) // self.data.expScale)
          amount.value = compute_CToken_749.value
        redeem_tokens.value = amount.value
      sp.else:
        redeem_tokens.value = params
      sp.verify((self.data.totalSupply // 1000000) >= redeem_amount.value, 'CT_INSUFFICIENT_CASH')
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      self.data.totalSupply = sp.as_nat(self.data.totalSupply - redeem_tokens.value, message = 'Insufficient supply')
      self.data.balances[sp.sender].balance = sp.as_nat(self.data.balances[sp.sender].balance - redeem_tokens.value, message = 'Insufficient balance')
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def reduceReserves(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(12)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('accrueInterest'))
      sp.transfer(params, sp.amount, sp.self_entry_point('reduceReservesInternal'))

    @sp.entry_point
    def reduceReservesInternal(self, params):
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(12), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(12)
      sp.verify((self.data.totalSupply // 1000000) >= params, 'CT_INSUFFICIENT_CASH')
      sp.verify(params <= self.data.totalReserves, 'CT_REDUCE_AMOUNT')
      sp.set_type(self.data.totalReserves, sp.TNat)
      sp.set_type(params, sp.TNat)
      self.data.totalReserves = sp.as_nat(self.data.totalReserves - params, message = 'SUBTRACTION_UNDERFLOW')
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def removePendingGovernance(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      self.data.pendingAdministrator = sp.none

    @sp.entry_point
    def repayBorrow(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.if ~ (self.data.balances.contains(sp.sender)):
        self.data.balances[sp.sender] = sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 0)
      sp.transfer(sp.record(cToken = sp.self_address, payer = sp.sender, borrower = sp.sender, repayAmount = params), sp.tez(0), sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), self.data.comptroller, entry_point='repayBorrowAllowed').open_some())
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      borrowSnapshot = sp.local("borrowSnapshot", self.data.balances[sp.sender].accountBorrows)
      borrowBalance = sp.local("borrowBalance", 0)
      sp.if borrowSnapshot.value.principal > 0:
        borrowBalance.value = (borrowSnapshot.value.principal * self.data.borrowIndex) // borrowSnapshot.value.interestIndex
      sp.set_type(borrowBalance.value, sp.TNat)
      sp.set_type(sp.min(borrowBalance.value, params), sp.TNat)
      self.data.balances[sp.sender].accountBorrows.principal = sp.as_nat(borrowBalance.value - sp.min(borrowBalance.value, params), message = 'SUBTRACTION_UNDERFLOW')
      self.data.balances[sp.sender].accountBorrows.interestIndex = self.data.borrowIndex
      sp.set_type(self.data.totalBorrows, sp.TNat)
      sp.set_type(sp.min(borrowBalance.value, params), sp.TNat)
      self.data.totalBorrows = sp.as_nat(self.data.totalBorrows - sp.min(borrowBalance.value, params), message = 'SUBTRACTION_UNDERFLOW')
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def repayBorrowBehalf(self, params):
      sp.set_type(params, sp.TRecord(borrower = sp.TAddress, repayAmount = sp.TNat).layout(("borrower", "repayAmount")))
      sp.verify(sp.sender != sp.self_address, 'CT_INTERNAL_CALL')
      sp.if ~ (self.data.balances.contains(sp.sender)):
        self.data.balances[sp.sender] = sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 0)
      sp.transfer(sp.record(cToken = sp.self_address, payer = sp.sender, borrower = params.borrower, repayAmount = params.repayAmount), sp.tez(0), sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), self.data.comptroller, entry_point='repayBorrowAllowed').open_some())
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      borrowSnapshot = sp.local("borrowSnapshot", self.data.balances[params.borrower].accountBorrows)
      borrowBalance = sp.local("borrowBalance", 0)
      sp.if borrowSnapshot.value.principal > 0:
        borrowBalance.value = (borrowSnapshot.value.principal * self.data.borrowIndex) // borrowSnapshot.value.interestIndex
      sp.set_type(borrowBalance.value, sp.TNat)
      sp.set_type(sp.min(borrowBalance.value, params.repayAmount), sp.TNat)
      self.data.balances[params.borrower].accountBorrows.principal = sp.as_nat(borrowBalance.value - sp.min(borrowBalance.value, params.repayAmount), message = 'SUBTRACTION_UNDERFLOW')
      self.data.balances[params.borrower].accountBorrows.interestIndex = self.data.borrowIndex
      sp.set_type(self.data.totalBorrows, sp.TNat)
      sp.set_type(sp.min(borrowBalance.value, params.repayAmount), sp.TNat)
      self.data.totalBorrows = sp.as_nat(self.data.totalBorrows - sp.min(borrowBalance.value, params.repayAmount), message = 'SUBTRACTION_UNDERFLOW')
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def setAccountSnapshot(self, params):
      sp.set_type(params, sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa"))))
      self.data.accCTokenBalance = params.cTokenBalance
      self.data.accBorrowBalance = params.borrowBalance
      self.data.accExchangeRateMantissa = params.exchangeRateMantissa

    @sp.entry_point
    def setAccrualIntPeriodRelevance(self, params):
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      sp.set_type(params, sp.TNat)
      self.data.accrualIntPeriodRelevance = params

    @sp.entry_point
    def setActiveOp(self, params):
      sp.set_type(params, sp.TNat)
      self.data.activeOperations.add(params)

    @sp.entry_point
    def setBorrowRatePerBlock(self, params):
      sp.verify(sp.sender == self.data.interestRateModel, 'CT_SENDER_NOT_IRM')
      sp.verify(self.data.activeOperations.contains(6), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(6)
      self.data.borrowRatePerBlock = params

    @sp.entry_point
    def setComptroller(self, params):
      sp.set_type(params, sp.TAddress)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      self.data.comptroller = params

    @sp.entry_point
    def setInterestRateModel(self, params):
      sp.set_type(params, sp.TAddress)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(9)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('accrueInterest'))
      sp.transfer(params, sp.tez(0), sp.self_entry_point('setInterestRateModelInternal'))

    @sp.entry_point
    def setInterestRateModelInternal(self, params):
      sp.set_type(params, sp.TAddress)
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(9), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(9)
      self.data.interestRateModel = params

    @sp.entry_point
    def setPendingGovernance(self, params):
      sp.set_type(params, sp.TAddress)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      self.data.pendingAdministrator = sp.some(params)

    @sp.entry_point
    def setReserveFactor(self, params):
      sp.set_type(params, sp.TNat)
      sp.verify(sp.sender == self.data.administrator, 'CT_NOT_ADMIN')
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(10)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('accrueInterest'))
      sp.transfer(params, sp.tez(0), sp.self_entry_point('setReserveFactorInternal'))

    @sp.entry_point
    def setReserveFactorInternal(self, params):
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(10), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(10)
      sp.set_type(sp.level, sp.TNat)
      sp.set_type(self.data.accrualBlockNumber, sp.TNat)
      compute_CToken_730 = sp.local("compute_CToken_730", sp.as_nat(sp.level - self.data.accrualBlockNumber, message = 'SUBTRACTION_UNDERFLOW'))
      sp.verify(compute_CToken_730.value < self.data.accrualIntPeriodRelevance, 'CT_INTEREST_OLD')
      sp.verify(self.data.isAccrualInterestValid, 'CT_INTEREST_INVALID')
      sp.verify(params <= self.data.reserveFactorMaxMantissa, 'CT_INVALID_RESERVE_FACTOR')
      self.data.reserveFactorMantissa = params
      self.data.isAccrualInterestValid = False

    @sp.entry_point
    def setSupplyRatePerBlock(self, params):
      sp.verify(sp.sender == self.data.interestRateModel, 'CT_SENDER_NOT_IRM')
      sp.verify(self.data.activeOperations.contains(7), 'OP_NOT_ACTIVE')
      self.data.activeOperations.remove(7)
      self.data.supplyRatePerBlock = params

    @sp.entry_point
    def sweepFA12(self, params):
      sp.set_type(params, sp.TRecord(amount = sp.TNat, tokenAddress = sp.TAddress).layout(("amount", "tokenAddress")))
      sp.transfer(sp.record(from_ = sp.self_address, to_ = self.data.administrator, value = params.amount), sp.tez(0), sp.contract(sp.TRecord(from_ = sp.TAddress, to_ = sp.TAddress, value = sp.TNat).layout(("from_ as from", ("to_ as to", "value"))), params.tokenAddress, entry_point='transfer').open_some())

    @sp.entry_point
    def sweepFA2(self, params):
      sp.set_type(params, sp.TRecord(amount = sp.TNat, id = sp.TNat, tokenAddress = sp.TAddress).layout(("amount", ("id", "tokenAddress"))))
      sp.transfer(sp.list([sp.record(from_ = sp.self_address, txs = sp.list([sp.record(to_ = self.data.administrator, token_id = params.id, amount = params.amount)]))]), sp.tez(0), sp.contract(sp.TList(sp.TRecord(from_ = sp.TAddress, txs = sp.TList(sp.TRecord(amount = sp.TNat, to_ = sp.TAddress, token_id = sp.TNat).layout(("to_", ("token_id", "amount"))))).layout(("from_", "txs"))), params.tokenAddress, entry_point='transfer').open_some())

    @sp.entry_point
    def sweepMutez(self, params):
      sp.set_type(params, sp.TBool)
      sp.if params:
        sp.send(self.data.administrator, sp.balance)
      sp.else:
        sp.send(self.data.administrator, sp.balance)

    @sp.entry_point
    def transfer(self, params):
      sp.set_type(params, sp.TRecord(from_ = sp.TAddress, to_ = sp.TAddress, value = sp.TNat).layout(("from_ as from", ("to_ as to", "value"))))
      sp.verify((params.from_ == sp.sender) | (self.data.balances[params.from_].approvals[sp.sender] >= params.value), 'CT_TRANSFER_NOT_APPROVED')
      sp.if ~ (self.data.balances.contains(params.to_)):
        self.data.balances[params.to_] = sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 0)
      sp.transfer(sp.record(cToken = sp.self_address, src = params.from_, dst = params.to_, transferTokens = params.value), sp.tez(0), sp.contract(sp.TRecord(cToken = sp.TAddress, dst = sp.TAddress, src = sp.TAddress, transferTokens = sp.TNat).layout((("cToken", "src"), ("dst", "transferTokens"))), self.data.comptroller, entry_point='transferAllowed').open_some())
      sp.set_type(sp.record(from_ = params.from_, sender = sp.sender, to_ = params.to_, value = params.value), sp.TRecord(from_ = sp.TAddress, sender = sp.TAddress, to_ = sp.TAddress, value = sp.TNat).layout((("from_", "sender"), ("to_", "value"))))
      sp.verify(self.data.balances[params.from_].balance >= params.value, 'CT_INSUFFICIENT_BALANCE')
      self.data.balances[params.from_].balance = sp.as_nat(self.data.balances[params.from_].balance - params.value)
      self.data.balances[params.to_].balance += params.value
      sp.if params.from_ != sp.sender:
        self.data.balances[params.from_].approvals[sp.sender] = sp.as_nat(self.data.balances[params.from_].approvals[sp.sender] - params.value)

    @sp.entry_point
    def updateAccountSnapshot(self, params):
      sp.transfer((params, sp.self_entry_point('setAccountSnapshot')), sp.tez(0), sp.self_entry_point('getAccountSnapshot'))

    @sp.entry_point
    def updateBorrowRateInternal(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(6), 'OP_NOT_ACTIVE')
      sp.transfer(sp.record(borrows = self.data.totalBorrows, cash = self.data.totalSupply // 1000000, cb = sp.self_entry_point('setBorrowRatePerBlock'), reserves = self.data.totalReserves), sp.tez(0), sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), self.data.interestRateModel, entry_point='getBorrowRate').open_some())

    @sp.entry_point
    def updateBorrowRatePerBlock(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(6)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('updateBorrowRateInternal'))

    @sp.entry_point
    def updateSupplyRateInternal(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.sender == sp.self_address, 'CT_INTERNAL_FUNCTION')
      sp.verify(self.data.activeOperations.contains(7), 'OP_NOT_ACTIVE')
      sp.transfer(sp.record(borrows = self.data.totalBorrows, cash = self.data.totalSupply // 1000000, cb = sp.self_entry_point('setSupplyRatePerBlock'), reserves = self.data.totalReserves), sp.tez(0), sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), self.data.interestRateModel, entry_point='getSupplyRate').open_some())

    @sp.entry_point
    def updateSupplyRatePerBlock(self, params):
      sp.set_type(params, sp.TUnit)
      sp.verify(sp.len(self.data.activeOperations) == 0, 'OP_IN_PROGRESS')
      self.data.activeOperations.add(7)
      sp.transfer(sp.unit, sp.tez(0), sp.self_entry_point('updateSupplyRateInternal'))

    Try borrow when there is no cash

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INSUFFICIENT_CASH'
    ()

    Test mint

    Mint allowed

    call mint with old accrue interest

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTEREST_OLD'
    ()

    call mint with relevant accrue interest

    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%mintAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Mint not allowed

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    False

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueFalseTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%mintAllowed (sp.record(cToken = s...)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Error:

    Wrong condition:
    ()

    Mint allowed again

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    True

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%mintAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Try mint in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%mint (1100)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Test Borrow

    Borrow allowed

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    call borrow with relevant account liquidity, asset price and accrue interest

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrowAmount = sp.TNat, borrower = sp.TAddress, cToken = sp.TAddress).layout(("cToken", ("borrower", "borrowAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%borrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    call borrow with old account liquidity

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTEREST_OLD'
    ()

    Borrow not allowed

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    False

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    FalseTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Reverted transaction
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrowAmount = sp.TNat, borrower = sp.TAddress, cToken = sp.TAddress).layout(("cToken", ("borrower", "borrowAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%borrowAllowed (sp.record(cToken = s...)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Error:

    Wrong condition:
    ()

    Borrow allowed again

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    FalseTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    FalseTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    True

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrowAmount = sp.TNat, borrower = sp.TAddress, cToken = sp.TAddress).layout(("cToken", ("borrower", "borrowAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%borrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Borrower BorrowAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Try borrow with insufficient cash

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Reverted transaction
    Transaction

    Transaction [KO] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INSUFFICIENT_CASH'
    ()

    Try borrow in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%borrow (1100)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Test Redeem

    Redeem allowed

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    call redeem with relevant account liquidity, asset price and accrue interest

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%redeemAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    call redeem with old account liquidity

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTEREST_OLD'
    ()

    Redeem not allowed

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    False

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueFalseTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueFalseTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueFalseTrue
    ()
    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%redeemAllowed (sp.record(cToken = s...)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Error:

    Wrong condition:
    ()

    Redeem allowed again

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueFalseTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueFalseTrue
    ()
    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    True

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%redeemAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Try redeem with insufficient balance

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Not the proper variant constructor [Some] != [None]

    Message: 'Insufficient balance'
    ()

    Redeem underlying

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, redeemAmount = sp.TNat, redeemer = sp.TAddress).layout(("cToken", ("redeemer", "redeemAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%redeemAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Redeemer RedeemAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Try redeem in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%redeem (1030)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Try redeem underlying in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%redeemUnderlying (1030)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Test Repay borrow

    Repay borrow allowed

    call repayBorrow with old accrue interest

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTEREST_OLD'
    ()

    call repayBorrow with relevant accrue interest

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%repayBorrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Repay borrow not allowed

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    False

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueFalse
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%repayBorrowAllowed (sp.record(cToken = s...)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Error:

    Wrong condition:
    ()

    Repay borrow allowed again

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    True

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%repayBorrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Repay borrow behalf

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Borrower RepayAmount
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9Ctz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%repayBorrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9Ctz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Repay more than borrowed

    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrower = sp.TAddress, cToken = sp.TAddress, payer = sp.TAddress, repayAmount = sp.TNat).layout(("cToken", ("payer", ("borrower", "repayAmount")))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%repayBorrowAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Payer Borrower RepayAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Try repayBorrow in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%redeem (1030)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Test transfer

    No tokens to transfer

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    From To Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INSUFFICIENT_BALANCE'
    ()

    No approved tokens to transfer

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    From To Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Error:

    Missing item in map: sp.address('tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58') is not in {} while evaluating self.data.balances[params.from_].approvals[sp.sender]
    ()

    Transfer successfully

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    From To Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, dst = sp.TAddress, src = sp.TAddress, transferTokens = sp.TNat).layout((("cToken", "src"), ("dst", "transferTokens"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Src Dst TransferTokens
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%transferAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Src Dst TransferTokens
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwitz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1%targetNat (100)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1

    Balance: 0.000000tz

    Operations:

    Storage:

    Last
    ()

    Approve and transfer successfully

    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Spender Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Owner Spender
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1%targetNat (100)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1

    Balance: 0.000000tz

    Operations:

    Storage:

    Last
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    From To Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, dst = sp.TAddress, src = sp.TAddress, transferTokens = sp.TNat).layout((("cToken", "src"), ("dst", "transferTokens"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Src Dst TransferTokens
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%transferAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Src Dst TransferTokens
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()

    Admin functions

    Pending governance

    Common user attempts to set pending governance

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to set pending governance

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    ()

    Accept governance

    Not pending admin attempts to accept governance

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_PENDING_ADMIN'
    ()

    Pending admin attempts to accept governance

    Transaction

    Transaction [OK] by [tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction

    Transaction [OK] by [tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    ()
    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Remove pending governance

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    ()

    Common user attempts to remove pending governance

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to remove pending governance

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Set comptroller

    Common user attempts to set comptroller

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to set comptroller

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Set interest rate model

    Common user attempts to set interest rate model

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to set interest rate model

    Multiple operations
    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Transfer 0.000000tz to sp.contract(sp.TAddress, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    9
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    9
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    9
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%setInterestRateModelInternal (sp.address('KT1Tezoo...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()

    Set reserve factor

    Common user attempts to Set reserve factor

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to Set reserve factor

    Multiple operations
    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    10
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    10
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    10
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%setReserveFactorInternal (1)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Add reserves

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Transfer 0.000000tz to sp.contract(sp.TRecord(addAmount = sp.TNat, originalSender = sp.TAddress).layout(("addAmount", "originalSender")), KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    AddAmount OriginalSender
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    11
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    11
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    11
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%addReservesInternal (sp.record(addAmount ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    AddAmount OriginalSender
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Try add reserves in callback

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%addReserves (1030)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_CALL'
    ()

    Reduce reserves

    Common user attempts to reduce reserves

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to reduce reserves

    Multiple operations
    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%reduceReservesInternal (5)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Try to reduce insufficient

    Reverted transaction
    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%accrueInterest (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    12
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%reduceReservesInternal (10000000000000000000...)

    Transaction [KO] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INSUFFICIENT_CASH'
    ()

    Check hardResetOp

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    1
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Common user attempts to hardResetOp

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_NOT_ADMIN'
    ()

    Admin attempts to hardResetOp

    Transaction

    Transaction [OK] by [tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()

    Test getBalanceOfUnderlying

    View stored balance

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwisp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1%targetNat (30)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1

    Balance: 0.000000tz

    Operations:

    Storage:

    Last
    ()

    Mint new tokens and check balance

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(cToken = sp.TAddress, mintAmount = sp.TNat, minter = sp.TAddress).layout(("cToken", ("minter", "mintAmount"))), KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF).open_some()
    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%mintAllowed (sp.record(cToken = s...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF

    CToken Minter MintAmount
    KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWCtz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    Borrow_allowed Mint_allowed Redeem_allowed Repay_borrow_allowed
    TrueTrueTrueTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwisp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HFalse
    ()
    Transaction
    Follow-up-transfer: KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1%targetNat (130)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1

    Balance: 0.000000tz

    Operations:

    Storage:

    Last
    ()

    Try with nonexistent account

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    KT10sp.contract(sp.TNat, KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1).open_some()

    Balance: 0.000000tz

    Error:

    Missing item in map: sp.address('KT10') is not in {sp.address('tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C') : sp.record(accountBorrows = sp.record(interestIndex = 0, principal = 0), approvals = {}, balance = 1000000000), sp.address('tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi') : sp.record(accountBorrows = sp.record(interestIndex = 1000047041005493033, principal = 0), approvals = {}, balance = 129723818), sp.address('tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58') : sp.record(accountBorrows = sp.record(interestIndex = 1000005880011289607, principal = 10), approvals = {sp.address('tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi') : 0}, balance = 0)} while evaluating self.data.balances[sp.fst(params)]
    ()

    Test getAccountSnapshot

    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    8
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%doAccrueInterest (840000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TPair(sp.TAddress, sp.TContract(sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa"))))), KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwisp.contract(sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa"))), KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%getAccountSnapshot ((sp.address('tz1WxrQ...)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwisp.contract(sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa"))), KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(account = sp.TAddress, borrowBalance = sp.TNat, cTokenBalance = sp.TNat, exchangeRateMantissa = sp.TNat).layout((("account", "borrowBalance"), ("cTokenBalance", "exchangeRateMantissa"))), KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()
    Account BorrowBalance CTokenBalance ExchangeRateMantissa
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%setAccountSnapshot (sp.record(account = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%getAccountSnapshot ((sp.address('tz1WxrQ...))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Account BorrowBalance CTokenBalance ExchangeRateMantissa
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()

    Test updateBorrowRatePerBlock

    Updated

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Operations:

    Storage:

    BorrowRate SupplyRate
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    6
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateBorrowRateInternal (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    6
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateBorrowRateInternal (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%setBorrowRatePerBlock (90000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getBorrowRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateBorrowRateInternal (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()

    Try internal

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_FUNCTION'
    ()

    Try set directly

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_SENDER_NOT_IRM'
    ()

    Test updateSupplyRatePerBlock

    Updated

    Transaction

    Transaction [OK] by [] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Balance: 0.000000tz

    Operations:

    Storage:

    BorrowRate SupplyRate
    ()
    Multiple operations
    Transaction

    Transaction [OK] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TUnit, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    7
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateSupplyRateInternal (sp.unit)

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TRecord(borrows = sp.TNat, cash = sp.TNat, cb = sp.TContract(sp.TNat), reserves = sp.TNat).layout((("borrows", "cash"), ("cb", "reserves"))), KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H).open_some()
    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    7
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getSupplyRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateSupplyRateInternal (sp.unit))

    Transaction [OK] by [KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC] at time [timestamp(0)] to KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H

    Borrows Cash Cb Reserves
    sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Balance: 0.000000tz

    Operations:

    Transfer 0.000000tz to sp.contract(sp.TNat, KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC).open_some()

    Storage:

    BorrowRate SupplyRate
    ()
    Transaction
    Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%setSupplyRatePerBlock (80000000000) (Follow-up-transfer: KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H%getSupplyRate (sp.record(borrows = ...) (Follow-up-transfer: KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC%updateSupplyRateInternal (sp.unit)))

    Transaction [OK] by [KT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4H] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Operations:

    Storage:

    AccBorrowBalance AccCTokenBalance AccExchangeRateMantissa AccrualBlockNumber AccrualIntPeriodRelevance ActiveOperations Administrator Balances BorrowIndex BorrowRateMaxMantissa BorrowRatePerBlock Comptroller ExpScale HalfExpScale InitialExchangeRateMantissa InterestRateModel IsAccrualInterestValid PendingAdministrator ReserveFactorMantissa ReserveFactorMaxMantissa SupplyRatePerBlock TotalBorrows TotalReserves TotalSupply
    tz1UyQDepgtUBnWjyzzonqeDwaiWoQzRKSP5
    Key AccountBorrows Approvals Balance
    tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    InterestIndex Principal
    Key Value
    tz1cFgiCfHJbTYrrQXHXHad6b8J1JoGxDX58
    InterestIndex Principal
    Key Value
    tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi
    KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eFKT1Tezooo2zzSmartPyzzSTATiCzzzwqqQ4HTrue
    ()

    Try internal

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_INTERNAL_FUNCTION'
    ()

    Try set directly

    Reverted transaction
    Transaction

    Transaction [KO] by [tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi] at time [timestamp(0)] to KT1Tezooo3zzSmartPyzzSTATiCzzzseJjWC

    Balance: 0.000000tz

    Error:

    Wrong condition:
    Message: 'CT_SENDER_NOT_IRM'
    ()